<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>本地 Pull Request 模拟</title>
  <!-- diff2html 样式 -->
  <link
    rel="stylesheet"
    href="https://cdn.jsdelivr.net/npm/diff2html/bundles/css/diff2html.min.css">
  <link rel="stylesheet" href="/style.css">
</head>
<body>
  <div class="container">
    <h1>本地 Pull Request 模拟</h1>
    <form method="get">
      <div>
        <label>Git 仓库路径：
          <input type="text" name="repoPath"
                 placeholder="/Users/you/project"
                 value="<%= repoPath %>" required>
        </label>
      </div>
      <div>
        <label>From:
          <input type="text" name="from" value="<%= from %>">
        </label>
        &nbsp;
        <label>To:
          <input type="text" name="to" value="<%= to %>">
        </label>
        &nbsp;
        <button type="submit">查看 Diff</button>
      </div>
    </form>
    <div id="diff-container"><%- diffHtml %></div>
    <div class="button-container">
      <button id="export-btn">导出批注 (CSV)</button>
      <button id="clear-btn">清空批注</button>
    </div>
  </div>

  <!-- diff2html 脚本 -->
  <script src="https://cdn.jsdelivr.net/npm/diff2html/bundles/js/diff2html.min.js"></script>
  <!-- 我们的交互脚本 -->
  <!-- <script src="/script.js"></script> -->
  <script src="/comment.js"></script>
</body>
</html>
